package lab02.test29;
/**
 * Created by dell on 2017/11/2.
 */
public class Test {
    public static void main(String[] args) {
        //创建一个一维数组
        int[] numbers=new int[5];
        numbers[0]=32;
        numbers[1]=33;
        numbers[2]=38;
        numbers[3]=39;
        numbers[4]=43;
        //在try字句中访问数组元素，使其产生ArrayIndexOutOfBoundsException异常
        //数组越界
        try{
            System.out.println(numbers[2]);
        }catch(ArrayIndexOutOfBoundsException e){
            System.out.println("数组越界！！！");
        }finally{
            System.out.println("最后都会执行的语句！");
        }
    }
}
